package com.memo.asynctasks;

import android.app.Activity;
import android.content.Intent;
import android.os.AsyncTask;

import com.memo.MainMenuActivity;

public class PreloadTask extends AsyncTask<Void, Boolean, Boolean>{
	private Activity act;
	
	public PreloadTask(Activity act) {
		this.act = act;
	}
	
	@Override
	protected Boolean doInBackground(Void... params) {
		try{
			Thread.sleep(1000);
		}catch (Exception e) {
			e.printStackTrace();
		}
		return null;
	}

	@Override
	protected void onPostExecute(Boolean result) {	
		super.onPostExecute(result);
		Intent intent = new Intent();
        intent.setClass(act, MainMenuActivity.class);
        act.finish();
        act.startActivity(intent);
	}
}
